Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [
      {
        pagePath: "/pages/home/home",
        text: "首页",
        iconPath: "/tabs/home.png",
        selectedIconPath: "/tabs/home-active.png"
      },
      {
        pagePath: "/pages/message/message",
        text: "消息",
        iconPath: "/tabs/message.png",
        selectedIconPath: "/tabs/message-active.png"
      },
      {
        pagePath: "/pages/profile/profile",
        text: "我的",
        iconPath: "/tabs/profile.png",
        selectedIconPath: "/tabs/profile-active.png"
      }
    ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const url = this.data.list[e.detail].pagePath
      wx.switchTab({url})
    }
  }
})
